<?php
header("content-type:text/html;charset=utf8");
$dbh=new PDO('mysql:host=localhost;dbname=gaofei','root','root');
$sql="select * from memberadd";
$arr=$dbh->query($sql)->fetchAll(PDO::FETCH_ASSOC);
?>
<table border="1">
    <a href="form.html">添加新闻</a>
    <a href="zhanshi.php">批量静态化</a>
    <tr>
        <td>编号</td>
        <td>标题</td>
        <td>内容</td>
        <td>操作</td>
    </tr>
    <?php foreach($arr as $key=>$value) { ?>
        <tr>
            <td><?php echo $value['id']?></td>
            <td><?php echo $value['title']?></td>
            <td><?php echo $value['content']?></td>
            <td>
                <a href="zhanshi.php?id=<?php echo $value['id']?>">静态化</a>
            </td>
        </tr>
    <?php } ?>
</table>
